import {
  Route, Link, Redirect
} from 'react-router-dom';
import style from './Index.less';

import InformationList from './list.component';
import InformationDetail from './detail.component';



class InformationComponent extends React.Component {
  constructor(props) {
    super(props)
  }
    componentWillMount(){
      console.log('square')
    }

  render() {
    let {match, location, operate} = this.props
    return (
      <div>
        <Route exact path={`${match.url}`} render={() => {
          return <Redirect to={`${match.url}/index`}/>
        }}/>
          <Route exact path={`/playRecord/manager/index`} render={(props) => <InformationList {...props}/> }/>
          <Route exact path={`/playRecord/manager/index/add`} render={(props) => <InformationDetail {...props}/> }/>
          <Route exact path={`/playRecord/manager/index/detail/:id`} render={(props) => <InformationDetail {...props}/> }/>


      </div>
    )
  }
}

export default InformationComponent;
